1. Field of the Invention
The present invention relates to an image processor and an image processing method, and more particularly, to an image processor and an image processing method for optimally processing drawing data on a personal computer or the like.
2. Description of the Related Art
Recently, languages used for a page description have made it possible to specify transparency, from applications or the OS (Operation System), as an expression of overlaid objects in such a manner that an object drawn below is transparently visible. The above-mentioned language for page description will be hereafter referred to as PDL (Page Description Language).
Specification of transparency is meant to specify that an overlying object is rendered transparent so that an underlying object can be seen through the overlying object.
However, there may be a situation that, depending on the type of PDL, transparency specification commands are not supported, although the application or the OS has specified transparency in response to the user's request. In such a case, instead of specifying transparency, the degree of filling the object may be reduced by creating a filled portion and an unfilled portion through which the underlying object can be seen. Such processing may be used in place of specifying transparency, allowing the underlying object to be seen through the overlying object. With this method, in other words, it is possible to execute a drawing command that allows the underlying object to be visible as if the overlying object has become transparent, even if the PDL does not support transparency specification.
As the specification used in this case for filling the object, a Graphic Device Interface (GDI) command, which is one of the drawing commands of Windows (registered trademark), for example, uses a pattern with reduced brush patterns. Since this object with a reduced pattern is one which is specified to be semi-transparent in the application, it will be hereafter referred to as a “semi-transparent object”.
The above-mentioned related art will be described according to how a specification is made in PowerPoint, a real application provided by Microsoft Corporation. In the entire hole layout shown in FIG. 1, for example, the drawing, as shown in FIG. 2, a gray pattern as the semi-transparent object on a hole 1 bearing the reference numeral 101 may be effected as follows. The user specifies semi-transparency in the GUI 201 “autoshape format setting” shown in FIG. 2. The autoshape format setting allows a specification such that the underlying hole 1 can be seen through the gray pattern as shown in object 204, by specifying gray in the filling-color specification 202 as well as checking on the semi-transparency specification 203 to specify semi-transparency.
The object 204, i.e., the semi-transparent object of FIG. 2, is actually drawn in a manner shown in FIG. 3. In order to first create a filled portion and an unfilled portion through which the underlying object can be seen, according to the semi-transparency specification of the object, an object having a lattice pattern (semi-transparent object) 301 is drawn where the degree of filling is reduced by a certain interval. Next, an object 302 is drawn, on which the object 301 will be overlaid. Finally, the two objects 301 and 302 are overlaid, resulting in an object 303. As understandable from the result, the circle included in the object 302 is drawn in a manner such that it is visible through the gray pattern whose filling-color is specified in the filling-color specification 202, whereby semi-transparency is achieved.
For reference, an exemplary case in which semi-transparency is not specified is shown in FIG. 4. In FIG. 4, semi-transparency specification of semi-transparency specification 203 is checked out by the user specifying the autoshape format of GUI 201. Therefore, the hole 1 area of object 101 is filled in gray, masking the underlying hole 1 area to be invisible.
Additionally, the actual drawing situation in this case is shown in FIG. 5. First, an object 501 filled in gray is drawn according to a fill-in-gray specification, then an object 502 to be overlaid is drawn next. Finally, overlaying the above-mentioned two objects 501 and 502 results in an object 503 filled in gray. As can be seen from the result, since the gray color is filled on the circle included in the object 502 specified to be filled but not specified to be a semi-transparent, the circle is not visible through the object 503.
The drawing data of FIGS. 3 and 5 goes through dither processing in the intermediate process of the printer and is printed out on paper or the like. An example of binarized dither for use in dither processing in the intermediate process of the printer is shown in FIG. 6. The dither shown is an example having reduced screen ruling in order to smoothly reproduce the gradation of the graphics. In addition, for simplicity, the case of a 64-gradation with a maximum value of 64 and also of a binarized dither is described here. It is needless to say that the dither may be different, depending on the printer resolution, the number of gradations, or what base number to be used, and is not limited to the one used herein for explanation.
With each depicted numeric value of the dither corresponding to a pixel, the dither processing compares an input value and the dither value in a pixel and binarizes the pixel into black if the input value is equal to or larger than the dither value. For example, an input signal, expressing an expanded portion of the object 303 of FIG. 3, is shown in FIG. 7. FIG. 8 shows the result of binarization by applying the dither of FIG. 6 to the input signal shown in FIG. 7. As can be seen in FIG. 8, conventional dither processing eliminates the gray part of the object 303 of FIG. 3, whereby only the circle portion is printed.
FIG. 9 illustrates the result of binarizing the object 503 of FIG. 5 by applying the dither of FIG. 6 thereto. As illustrated, it may happen that the resulting binarized positions, which are originally specified to be filled in gray and thus supposed to have several dots arranged therein, have no dots arranged therein. For example, as shown in FIG. 8, the background of the circle which is supposed to have dots arranged therein has no dots at all. This is because interference occurred between the dither processing in the intermediate process of the printer and the drawing pattern specified to be semi-transparent, whereby a part which was originally supposed to be filled is not filled. Although density may vary due to monochrome print here, color tone may vary in the case of color print because a color dot which was supposed to be placed on a supposed position is not formed.
As thus described, applying dither processing to a semi-transparent object may result in the absence of dots in a region on a semi-transparent object where the dots were supposed to be formed. In other words, dither processing may prevent the expressing of the original semi-transparent object.
In addition, since intermediate processes in a printer may differ according to the type of printer, interference or moire may vary between the above-mentioned drawing pattern specified to be semi-transparent and the dither processing, resulting in varied color tone or density due to difference between machines.
Therefore, according to Japanese Patent Laid-Open No. 2006-254095, which proposes a conventional solution, a pattern cycle and a direction in the image signal are detected in the output color space, and the presence of moire is determined by the detection result and the normally used screen cycle and direction to switch screens as necessary. In other words, Japanese Patent Laid-Open No. 2006-254095 proposes a method that determines the part where moire due to interference is likely to appear by translating the PDL and frequency-analyzing each pixel of the resulting bit map data, and modifies the screen processing of that part to a high-frequency screen such as error diffusion processing.
However, with the method described in Japanese Patent Laid-Open No. 2006-254095, although a screen specification with a low-frequency and low screen ruling has been made in order to smoothly reproduce an object specified to be filled in a uniform color, a grid pattern may be detected due to the semi-transparency specification, and screen processing may be changed to error diffusion processing in order to prevent the occurrence of moire. Such a change to error diffusion processing may raise the frequency and degrade the stability of the screen, which may result in increased roughness. In other words, the reduced screen ruling, originally chosen with the purpose of smoothly reproducing the object in a uniform color or gradation, is modified to high screen ruling, causing roughness against the intention of the designer and the user. In addition, executing by software the complicated frequency analysis processing for each and every pixel is time-consuming, whereas execution by hardware requires enormously large scale hardware. Furthermore, there was no way of preliminarily checking how the image would look like until it is printed out.